<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
	<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@taglib prefix="shiro" uri="http://shiro.apache.org/tags" %>
<%
	request.setCharacterEncoding("UTF-8");
	String htmlData = request.getParameter("content1") != null ? request.getParameter("content1") : "";
%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<%@ include file="/WEB-INF/JSP/backHome/modalWindows/StudentsListPage.jsp"%>
<%@ include file="/WEB-INF/JSP/backHome/modalWindows/argeeCommon.jsp" %>
<%@ include file="/WEB-INF/JSP/backHome/modalWindows/againstAuditCommon.jsp" %>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
<script type="text/javascript" src="<%=path%>/My97DatePicker/WdatePicker.js"></script>
<link rel="stylesheet" type="text/css" href="<%=path%>/CSS/backLayout.css">
<link rel="stylesheet" type="text/css" href="<%=path%>/CSS/bombBox.css">
</head>
<style>
select{width: 234px;height: 31px}
.gn_name{padding-top: 5px}

.div_zilei {
    width: 94.5%;
    height: 30px
}
.tr{height:40px;font-weight: 700}
.tr td{font-size: 14px;background: #57a0ff;color: #ffffff}
.tr_td{height: 40px;}
.tr_td td{border-bottom: 1px solid #ededed;text-align: center;}
tr td:nth-child(1) {font-size: 14px;color: #cccccc}
.date{border: 0;background: #ffffff;text-align: center;}
.tr_td td:nth-child(1){border-left: 1px solid #cccccc;}
.tr_td td:nth-child(3){border-right: 1px solid #cccccc;}
.addTable.deleteTable:HOVER{cursor:pointer;}
type[type='checkbox']{width: 15px}
#table1 input{width: 100px}
#table3 input{width: 100px;}
.fseq2{width:25px;border:none;color:#cccccc;text-align: center;}
.div_input_hang {
	width: 100%;
	height: 40px;
}
.input_hang {
	float: left;
	width: 500px;
	height: 40px;
}
</style>
<body style="background: #f5f5f5">
<div class="main">
<div id="modal-overlay">
			    
			</div>
			<div class="modal-data2">
				<div style="height: 60px">
				 <ul>
				  	<li  style="text-align: left;margin-left: 60px;height: 40px;line-height: 40px">
				  		<span>名称：</span>
				  		<span>
				  		 	<input class="name" type="text" >
				  		</span>
				  		<span>
				  			<button class="findBtn2">
				  				查询
				  			</button>
				  		</span>
				  	</li>
				 </ul>
				</div>
				<div style="width:auto; height:350px; overflow:scroll;">
				      <form action="">
				        <table class="head1" style="width: auto;white-space:nowrap;border-spacing: 0px">
				       		<tr style="background: #f2f2f2;height: 30px;line-height: 20px;" class="sel">
						        <td style="width: 20px"></td> 
						        <td>编码</td>
						        <td>名称</td>
						        <td>金额</td>
						        <td>简称</td>
						        <td>描述</td>
						        <td>创建时间</td>
						        <td>用户名</td>
						        <td>最后修改时间</td>
						        <td>用户名</td>
						        <td>财务组织</td>
						        <td>适用车辆</td>
						        <td>是否包考试费</td>
						        <td>是否包练车</td>
						        <td>VIP</td>
						        <td>特训班</td>
						        <td>状态</td>
			        		</tr>
					        <c:forEach items="${clazzs}" var="clazz" >
					        	<tr style="margin-top: 45px" class="jx">
					        		<td>
					        		 	<input style="width: 15px;height: 15px" type="checkbox" name="jx"  value="${clazz.fid}">
					        		</td>
					        		<td>${clazz.fnumber}</td>
					        		<td>${clazz.fnameL2}</td>
					        		<td>${clazz.cfprice}</td>
					        		<td>${clazz.fsimplename}</td>	
					        		<td>${clazz.fdescriptionL2}</td>
					        		<td>${clazz.fcreatetime}</td>		
					        		<td>${clazz.createName}</td>
					        		<td>${clazz.flastupdatetime}</td>	
					        		<td>${clazz.updateName}</td>		
					        		<td>${clazz.cfficompanyName}</td>
					        		<td>${clazz.cfsycl}</td>	
					        		<c:if test="${clazz.cfksf ne 1}">
					        		<td><input style="width: 15px;height: 15px" type="checkbox" disabled="disabled"></td>		
					        		</c:if>	
					        		<c:if test="${clazz.cfksf eq 1}">
					        		<td><input style="width: 15px;height: 15px" type="checkbox" checked="checked" disabled="disabled"></td>		
					        		</c:if>
					        		<c:if test="${clazz.cflc ne 1}">
					        		<td><input style="width: 15px;height: 15px" type="checkbox" disabled="disabled"></td>		
					        		</c:if>	
					        		<c:if test="${clazz.cflc eq 1}">
					        		<td><input style="width: 15px;height: 15px" type="checkbox" checked="checked" disabled="disabled"></td>		
					        		</c:if>	
					        		<c:if test="${clazz.cfvip ne 1}">
					        		<td><input style="width: 15px;height: 15px" type="checkbox" disabled="disabled"></td>		
					        		</c:if>	
					        		<c:if test="${clazz.cfvip eq 1}">
					        		<td><input style="width: 15px;height: 15px" type="checkbox" checked="checked" disabled="disabled"></td>		
					        		</c:if>	
					        		<c:if test="${clazz.cftx ne 1}">
					        		<td><input style="width: 15px;height: 15px" type="checkbox" disabled="disabled"></td>		
					        		</c:if>	
					        		<c:if test="${clazz.cftx eq 1}">
					        		<td><input style="width: 15px;height: 15px" type="checkbox" checked="checked" disabled="disabled"></td>		
					        		</c:if>	
					        		<td>启用</td>
					        	</tr>
					        </c:forEach>
				        </table>
				      </form>
				</div>
				      <button class="subtn2" style="width: 200px;position: absolute;bottom: 25px;font-size: 16px;left: 170px" > 
				      	确定
				      </button>
				      <button class="btn" style="width: 200px;position: absolute;bottom: 25px;font-size: 16px;right: 170px" > 
				      	关闭
				      </button>
			</div>
		<c:if test="${empty chargeClazzWillmigerl}">
		<div class="weizhi">
			财务管理>>转班收费单>>新增
		</div>
		</c:if>
		<c:if test="${not empty chargeClazzWillmigerl}">
			<c:if test="${chargeClazzWillmigerl.cfbillstate <= 3}">
		<div class="weizhi">
			财务管理>>转班收费单>>修改
		</div>
		</c:if>
		</c:if>
		<c:if test="${not empty chargeClazzWillmigerl}">
			<c:if test="${chargeClazzWillmigerl.cfbillstate > 3}">
		<div class="weizhi">
			财务管理>>转班收费单>>查看
		</div>
		</c:if>
		</c:if>
	<div class="div_body" style="box-shadow: 0 0 5px #cccccc;height: 950px">
			<div class="div_form">
			<!----------------------------- 新增 --------------------------------->
			<c:if test="${empty chargeClazzWillmigerl}">
				<form action="<%=path%>/DrivingSys/editChargeClazzWillmigerl" class="form" method="post"
					  onsubmit="return verify();">
						<div class="div_input_hang">
							<div class="input_hang">
								<span class="gn_name">驾校&nbsp;:&nbsp;</span>
								<input  type="text" name="name"  value="${department.fnameL2}" readonly="readonly" style="color: gray;"/>
							</div>
							<div class="input_hang">
								<span class="gn_name">单据编号&nbsp;:&nbsp;</span>
								<input  type="text" name="fnumber" value="${fnumber}" style="color: gray;" readonly="readonly"/>
							</div>
							<div class="input_hang">
								<span class="gn_name">业务日期&nbsp;:&nbsp;</span>
								<input  type="text" name="fbizdate"  id="ywrq" value="${endTime}" 
								onclick="WdatePicker({el:'ywrq',dateFmt:'yyyy-MM-dd'})"/>
								<img onclick="WdatePicker({el:'ywrq',dateFmt:'yyyy-MM-dd'})" 
					            src="<%=path%>/image/date.jpg"  align="absmiddle" style="padding-left: 15px">
							</div>
						</div>
						<div class="div_input_hang">
							<div class="input_hang">
								<span class="gn_name">备注&nbsp;:&nbsp;</span>
								<input name="cfdesc"/>
							</div>
							<div class="input_hang">
								<span class="gn_name">单据状态&nbsp;:&nbsp;</span>
								<select name="cfbillstate" disabled="disabled">
									<option style="color: gray;">新增</option>
								</select>
							</div>
					</div>
					
					<div class="div_zilei">
							<div style="width: 93%;text-align: right;">
								<img src="<%=path%>/image/insert2323.jpg" class="addTable">
								<span style="padding-right: 20px;color: #57a0ff;font-weight: 700;font-size: 14px" class="addTable">添加</span>
								<img src="<%=path%>/image/delete212.png" class="deleteTable">
								<span class="deleteTable" style="color: #57a0ff;font-weight: 700;font-size: 14px" class="deleteTable">删除</span>
							</div>
					</div>
					<input type="hidden" class="stu">
					<input type="hidden" class="stu2">
					<div style="min-height: 500px;width: 88%;padding-left: 90px;position: relative;">
					<div style="overflow:scroll;height: 500px;width: 100%"> 
							<table  width="100%" align="center" id="table1" style="min-height:50px;border-spacing:0;">
									<tr class="tr">
										<td  width="20px"></td>
										<td  width="30px"></td>
										<td align="center">学员</td>
										<td align="center">学员编码</td>
										<td align="center">身份证号</td>
										<td align="center">性别</td>
										<td align="center">手机</td>
										<td align="center">入学时间</td>
										<td align="center">当前班级</td>
										<td align="center">当前班级金额</td>
										<td align="center">实收金额</td>
										<td align="center">转入班级</td>
										<td align="center">转入班级金额</td>
										<td align="center">收费金额</td>
										<td align="center">备注</td>
									</tr>
							</table>
						</div>
					</div>
					
					
					 <div class="div_input_hang" style="margin-top: 50px">
							<div class="input_hang">
								<span class="gn_name">审核人&nbsp;:&nbsp;</span>
								<input name="fhandlerid" readonly="readonly" style="color: gray;" type="text"/>
							</div>
							<div class="input_hang">
								<span class="gn_name">创建者&nbsp;:&nbsp;</span>
								<input name="fcreatorid2" readonly="readonly" value="${name}" style="color: gray;" type="text"/>
								<input name="fcreatorid" readonly="readonly"  style="color: gray;" type="hidden"/>
							</div>
							<div class="input_hang">
								<span class="gn_name">创建时间&nbsp;:&nbsp;</span>
								<input name="fcreatetime" style="color: gray;"readonly="readonly" type="text"/>
							</div> 
					</div> 
					
					<div class="div_tj" style="padding-top: 0px;margin-left: 140px;margin-top: 20px;">
						<div>
							<input class="input_submit bc" value="" type="submit" style="margin-top: 0px;margin-right: 30px;"/>
						</div>
						<div>
							<input type="button" class="input_back fh" value="" onclick="back()" style="margin-top: 0px;"/>
						</div>
					</div>
				</form>
			</c:if>
			
			<!----------------------------- 修改 --------------------------------->
			<c:if test="${not empty chargeClazzWillmigerl}">
				<c:if test="${chargeClazzWillmigerl.cfbillstate <= 3 }">
				<form action="<%=path%>/DrivingSys/editChargeClazzWillmigerl" class="form" method="post"
					  onsubmit="return verify();">
						<div class="div_input_hang">
							<div class="input_hang">
								<span class="gn_name">驾校&nbsp;:&nbsp;</span>
								<input  type="text" name="name"  value="${chargeClazzWillmigerl.companyName}" readonly="readonly" style="color: gray;"/>
								<input type="hidden" value="${chargeClazzWillmigerl.fid}" name="fid" id="fid">
							</div>
							<div class="input_hang">
								<span class="gn_name">单据编号&nbsp;:&nbsp;</span>
								<input  type="text" name="fnumber" value="${chargeClazzWillmigerl.fnumber}" style="color: gray;" readonly="readonly"/>
							</div>
							<div class="input_hang">
								<span class="gn_name">业务日期&nbsp;:&nbsp;</span>
								<input  type="text" name="fbizdate"  id="ywrq" value="${chargeClazzWillmigerl.fbizdate}" 
								onclick="WdatePicker({el:'ywrq',dateFmt:'yyyy-MM-dd'})"/>
								<img onclick="WdatePicker({el:'ywrq',dateFmt:'yyyy-MM-dd'})" 
					            src="<%=path%>/image/date.jpg"  align="absmiddle" style="padding-left: 15px">
							</div>
						</div>
						<div class="div_input_hang">
							<div class="input_hang">
								<span class="gn_name">备注&nbsp;:&nbsp;</span>
								<input name="cfdesc" value="${chargeClazzWillmigerl.cfdesc}" />
							</div>
							<div class="input_hang">
								<span class="gn_name">单据状态&nbsp;:&nbsp;</span>
								<select name="cfbillstate" disabled="disabled">
									<option style="color: gray;">保存</option>
								</select>
							</div>
					</div>
					
					<div class="div_zilei">
							<div style="width: 93%;text-align: right;">
								<img src="<%=path%>/image/insert2323.jpg" class="addTable">
								<span style="padding-right: 20px;color: #57a0ff;font-weight: 700;font-size: 14px" class="addTable">添加</span>
								<img src="<%=path%>/image/delete212.png" class="deleteTable">
								<span class="deleteTable" style="color: #57a0ff;font-weight: 700;font-size: 14px" class="deleteTable">删除</span>
							</div>
					</div>
					<input type="hidden" class="stu">
					<input type="hidden" class="stu2">
					<div style="min-height: 500px;width: 88%;padding-left: 90px;position: relative;">
					<div style="overflow:scroll;height: 500px;width: 100%"> 
							<table  width="100%" align="center" id="table1" style="min-height:50px;border-spacing:0;">
									<tr class="tr">
										<td  width="20px"></td>
										<td  width="30px"></td>
										<td align="center">学员</td>
										<td align="center">学员编码</td>
										<td align="center">身份证号</td>
										<td align="center">性别</td>
										<td align="center">手机</td>
										<td align="center">入学时间</td>
										<td align="center">当前班级</td>
										<td align="center">当前班级金额</td>
										<td align="center">实收金额</td>
										<td align="center">转入班级</td>
										<td align="center">转入班级金额</td>
										<td align="center">收费金额</td>
										<td align="center">备注</td>
									</tr>
									<c:forEach items="${chargeClazzWillmigerlEntrys}" var="s">
									<tr style="margin-top: 45px" class="jx${s.fseq}">
										<td width="20px"><input type="checkbox" name="check" style="width: 15px"></td>
										<td>
											<input type="text" readonly="readonly" class="fseq2" value="${s.fseq}" style="width: 40px">
											<input type="hidden" name="fseq" class="fseq" value="${s.fseq}">
										</td>
										<td><input type="text" name="studentName" class="studentName is_click_ne"
												   onclick="xy($(this))" value="${s.studentName}"></td>
										<td>
											<input type="text" name="cfstudentno" class="cfstudentno" readonly unselectable="on" value="${s.cfstudentno}">
											<input type="hidden" name="cfstudentid" value="${s.cfstudentid}">
										</td>
										<td><input type="text" name="cfidcardno" class="cfidcardno" readonly unselectable="on" value="${s.cfidcardno}"></td>
										<td>
										<c:if test="${s.cfsex == '1'}">
											<input type="text" name="cfsex2" class="cfsex2" readonly unselectable="on" value="男">
											<input type="hidden" name="cfsex" value="1">
										</c:if>
										<c:if test="${s.cfsex == '2'}">
											<input type="text" name="cfsex2" class="cfsex2" readonly unselectable="on" value="女">
											<input type="hidden" name="cfsex" value="2">
										</c:if>
										<c:if test="${empty s.cfsex}">
											<input type="text" name="cfsex2" class="cfsex2" readonly unselectable="on">
											<input type="hidden" name="cfsex">
										</c:if>
										</td>
										<td><input type="text" name="cfmobile" class="cfmobile" readonly unselectable="on" value="${s.cfmobile}"></td>
										<td><input type="text" name="cfrxrq" class="cfrxrq" readonly unselectable="on" value="${s.cfrxsj2}"></td>
										<td>
											<input type="text" name="dqClazz" class="dqClazz is_click_ne"
												   onclick="bj($(this))" value="${s.dqClazz}">
											<input type="hidden" name="cfcurrentclassid" value="${s.cfcurrentclassid}">
										</td>
										<td><input type="text" name="cfamount" class="cfamount" readonly unselectable="on" value="${s.cfamount}"></td>
										<td><input type="text" name="cfshje" class="cfshje" onblur="cfshje2($(this))" value="${s.cfshje}"></td>
										<td>
											<input type="text" name="zrClazz" class="zrClazz is_click_ne"
												   onclick="bj($(this))" value="${s.zrClazz}">
											<input type="hidden" name="cfreturninclassid" value="${s.cfreturninclassid}">
										</td>
										<td><input type="text" name="cfzrbjamount" class="cfzrbjamount" readonly unselectable="on" value="${s.cfzrbjamount}"></td>
										<td><input type="text" name="cfsfje" class="cfsfje" value="${s.cfsfje}"
												   onblur="cfsfje2($(this))"></td>
										<td><input type="text" name="cfremark" class="cfremark" value="${s.cfremark}"></td>
									</tr>
									</c:forEach>
							</table>
						</div>
					</div>
					
					
					 <div class="div_input_hang" style="margin-top: 50px">
							<div class="input_hang">
								<span class="gn_name">审核人&nbsp;:&nbsp;</span>
								<input name="fhandlerid" readonly="readonly" style="color: gray;" type="text" value="${chargeClazzWillmigerl.auditName}"/>
							</div>
							<div class="input_hang">
								<span class="gn_name">创建者&nbsp;:&nbsp;</span>
								<input name="fcreatorid2" readonly="readonly" value="${chargeClazzWillmigerl.createName}" style="color: gray;" type="text"/>
							</div>
							<div class="input_hang">
								<span class="gn_name">创建时间&nbsp;:&nbsp;</span>
								<input name="fcreatetime" style="color: gray;"readonly="readonly" type="text" value="${chargeClazzWillmigerl.fcreatetime}"/>
							</div>
					 </div>
					<input type="hidden" id="auditState" value="${AuditState}">
					<div class="div_tj" style="padding-top: 0px">
						<shiro:hasPermission name="/querychargeClazzWillmigerlByFid">
							<div>
								<input class="input_submit bc" value="" type="submit">
							</div>
						</shiro:hasPermission>
						<shiro:hasPermission name="/submitChargeClazzWillmigerl">
							<div style="padding-right: 50px">
								<input type="button" class="input_submit tj" value="" id="submit">
							</div>
						</shiro:hasPermission>
						<div>
							<input type="button" class="input_back fh" value="" onclick="back()"/>
						</div>
					</div>
				</form>
			</c:if>
			</c:if>
			
			<!----------------------------- 查看 --------------------------------->
			<c:if test="${not empty chargeClazzWillmigerl}">
				<c:if test="${chargeClazzWillmigerl.cfbillstate > 3}">
				<form action="<%=path%>/DrivingSys/editChargeClazzWillmigerl" class="form">
						<div class="div_input_hang">
							<div class="input_hang">
								<span class="gn_name">驾校&nbsp;:&nbsp;</span>
								<input  type="text" name="name"  value="${chargeClazzWillmigerl.companyName}" readonly="readonly" style="color: gray;"/>
								<input type="hidden" value="${chargeClazzWillmigerl.fid}" name="fid" id="fid">
							</div>
							<div class="input_hang">
								<span class="gn_name">单据编号&nbsp;:&nbsp;</span>
								<input type="text" name="fnumber" id="fnumber" value="${chargeClazzWillmigerl.fnumber}"
									   style="color: gray;" readonly="readonly"/>
							</div>
							<div class="input_hang">
								<span class="gn_name">业务日期&nbsp;:&nbsp;</span>
								<input  type="text" name="fbizdate"  id="ywrq" value="${chargeClazzWillmigerl.fbizdate}" readonly="readonly"/>
								<img src="<%=path%>/image/date.jpg" style="padding-left: 15px">
							</div>
						</div>
						<div class="div_input_hang">
							<div class="input_hang">
								<span class="gn_name">备注&nbsp;:&nbsp;</span>
								<input name="cfdesc" value="${chargeClazzWillmigerl.cfdesc}" readonly="readonly"/>
							</div>
							<div class="input_hang">
								<span class="gn_name">单据状态&nbsp;:&nbsp;</span>
								<select name="cfbillstate" disabled="disabled">
									<c:if test="${chargeClazzWillmigerl.cfbillstate== 4}">
										<option style="color: gray;">提交</option>
									</c:if>
									<c:if test="${chargeClazzWillmigerl.cfbillstate== 5}">
										<option style="color: gray;">审核</option>
									</c:if>
								</select>
							</div>
					</div>
					
					<div class="div_zilei">
							<div style="width: 88%;text-align: right;">
									<%--<img src="<%=path%>/image/insert2323.jpg">
                                    <span style="padding-right: 20px;color: #a9bbe0;font-size: 14px">添加</span>
                                    <img src="<%=path%>/image/delete212.png">
                                    <span style="color: #a9bbe0;font-size: 14px">删除</span>--%>
							</div>
					</div>
					<input type="hidden" id="state" value="${chargeClazzWillmigerl.cfbillstate}">
					<input type="hidden" class="stu">
					<input type="hidden" class="stu2">
					<input type="hidden" id="type">
					<div style="min-height: 500px;width: 88%;padding-left: 90px;position: relative;">
					<div style="overflow:scroll;height: 500px;width: 100%"> 
							<table  width="100%" align="center" id="table3" style="min-height:50px;border-spacing:0;">
									<tr class="tr">
										<td  width="20px"></td>
										<td  width="30px"></td>
										<td align="center">学员</td>
										<td align="center">学员编码</td>
										<td align="center">身份证号</td>
										<td align="center">性别</td>
										<td align="center">手机</td>
										<td align="center">入学时间</td>
										<td align="center">当前班级</td>
										<td align="center">当前班级金额</td>
										<td align="center">实收金额</td>
										<td align="center">转入班级</td>
										<td align="center">转入班级金额</td>
										<td align="center">收费金额</td>
										<td align="center">备注</td>
									</tr>
									<c:forEach items="${chargeClazzWillmigerlEntrys}" var="s">
									<tr style="margin-top: 45px" class="jx${s.fseq}">
										<td width="20px"><input type="checkbox" name="check" style="width: 15px" disabled="disabled"></td>
										<td>
											<input type="text" readonly="readonly" class="fseq2" value="${s.fseq}" style="width: 40px">
											<input type="hidden" name="fseq" class="fseq" value="${s.fseq}">
										</td>
										<td><input type="text" name="studentName" class="studentName" readonly="readonly" value="${s.studentName}"></td>
										<td>
											<input type="text" name="cfstudentno" class="cfstudentno" readonly="readonly" value="${s.cfstudentno}">
											<input type="hidden" name="cfstudentid" value="${s.cfstudentid}">
										</td>
										<td><input type="text" name="cfidcardno" class="cfidcardno" readonly="readonly" value="${s.cfidcardno}"></td>
										<td>
										<c:if test="${s.cfsex == '1'}">
											<input type="text" name="cfsex2" class="cfsex2" readonly="readonly" value="男">
											<input type="hidden" name="cfsex" value="1">
										</c:if>
										<c:if test="${s.cfsex == '2'}">
											<input type="text" name="cfsex2" class="cfsex2" readonly="readonly" value="女">
											<input type="hidden" name="cfsex" value="2">
										</c:if>
										<c:if test="${empty s.cfsex}">
											<input type="text" name="cfsex2" class="cfsex2" readonly="readonly">
											<input type="hidden" name="cfsex">
										</c:if>
										</td>
										<td><input type="text" name="cfmobile" class="cfmobile" readonly="readonly" value="${s.cfmobile}"></td>
										<td><input type="text" name="cfrxrq" class="cfrxrq" readonly="readonly" value="${s.cfrxsj2}"></td>
										<td>
											<input type="text" name="dqClazz" class="dqClazz" readonly="readonly" value="${s.dqClazz}">
											<input type="hidden" name="cfcurrentclassid" value="${s.cfcurrentclassid}">
										</td>
										<td><input type="text" name="cfamount" class="cfamount" readonly="readonly" value="${s.cfamount}"></td>
										<td><input type="text" name="cfshje" class="cfshje" readonly="readonly" value="${s.cfshje}"></td>
										<td>
											<input type="text" name="zrClazz" class="zrClazz" readonly="readonly" value="${s.zrClazz}">
											<input type="hidden" name="cfreturninclassid" value="${s.cfreturninclassid}" >
										</td>
										<td><input type="text" name="cfzrbjamount" class="cfzrbjamount" readonly="readonly" value="${s.cfzrbjamount}"></td>
										<td><input type="text" name="cfsfje" class="cfsfje" value="${s.cfsfje}" readonly="readonly"></td>
										<td><input type="text" name="cfremark" class="cfremark" value="${s.cfremark}" readonly="readonly"></td>
									</tr>
									</c:forEach>
							</table>
						</div>
					</div>
					
					
					 <div class="div_input_hang" style="margin-top: 50px">
							<div class="input_hang">
								<span class="gn_name">审核人&nbsp;:&nbsp;</span>
								<input name="fhandlerid" readonly="readonly" style="color: gray;" type="text" value="${chargeClazzWillmigerl.auditName}"/>
							</div>
							<div class="input_hang">
								<span class="gn_name">创建者&nbsp;:&nbsp;</span>
								<input name="fcreatorid2" readonly="readonly" value="${chargeClazzWillmigerl.createName}" style="color: gray;" type="text"/>
							</div>
							<div class="input_hang">
								<span class="gn_name">创建时间&nbsp;:&nbsp;</span>
								<input name="fcreatetime" style="color: gray;"readonly="readonly" type="text" value="${chargeClazzWillmigerl.fcreatetime}"/>
							</div> 
					</div> 
					
					<div class="div_tj">
						<c:if test="${AuditState == 'true'}">
							<shiro:hasPermission name="/auditChargeClazzWillmigerl">
								<div style="padding-right: 50px">
									<input type="button" class="input_submit sh" value="" id="sh">
									<input type="hidden" value="1">
								</div>
							</shiro:hasPermission>
						</c:if>
						<shiro:hasPermission name="/againstAuditChargeClazzWillmigerl">
							<div style="padding-right: 50px">
								<input type="button" class="input_submit fsh" value="" id="fsh">
							<input type="hidden" value="2">
						</div>
						</shiro:hasPermission>
						<div>
							<input type="button" class="input_submit cklc" value=""
								   onclick="lookActivitiImg('${key}',$('#fnumber').val())"/>
						</div>
						<div>
							<input type="button" class="input_back fh" value="" onclick="back()"/>
						</div>
				</div>
				</form>
			</c:if>
			</c:if>
		</div>
	</div>
</div>
</body>
<script type="text/javascript" src="<%=path%>/JQuery/jquery-1.8.2.js"></script>
<%@ include file="/WEB-INF/JSP/ajax.jsp"%>
<script type="text/javascript" src="<%=path%>/HoganJS/handlebars-v4.0.11.js"></script>
<script type="text/javascript">

$(document).ready(function(){
	var type = "${type}"
	if(type == null || type == ''){
		
	}else{
		editAlert();
	}
})

//删除行
$(".deleteTable").click(function(){
	var tr_len = $("#table1 tr").length;
	if(tr_len == 1){
		
	}else{
		var s = '';
		$('input:checkbox[name=check]').each(function(i) {
			if($(this).is(':checked')){
				$(this).parent().parent().remove();
				s = '1';
			}
		})
		//判断是否选中
		if(s == null || s == ''){
			alert("请选择一条数据删除");
			return false;
		}
		if($("#table1 tr").length == 2){
			$("#table2").css('display','none')
		}
		//重新排序
		$('#table1 tr td .fseq').each(function(i) {
			var s = i*1 + 1*1;
			$(this).val(s);
			$(this).prev().val(s);
			$(this).parent().parent().attr("class",'jx'+s);
		})
	}
})
//返回
function back(){
    parent.closeSelectCard()

    //location = '<%=path%>/DrivingSys/queryChargeClazzWillmigerl/look.action';
}

//开启学员弹框
 function xy(_this){
	var jx = _this.parent().parent().prop("class");
	$(".stu").val(jx)
	$('#modal-overlay').css('visibility','visible')
	$('.modal-data').css('visibility','visible')
	$('#index').val(1)
	$('.page').show();
}

//单机选中学员
 $(".xysj td").live('click',function(){
     $('input:checkbox[name=student]:checked').each(function(i) {
     	$(this).removeAttr("checked");
      });
      $(this).parent().find("input:checkbox").attr('checked','checked');
 }) 

//开启班级弹框
 function bj(_this){
	var jx = _this.parent().parent().prop("class");
	$(".stu").val(jx)
	var bj = _this.prop("class")
	$(".stu2").val(bj)
	$('#modal-overlay').css('visibility','visible')
	$('.modal-data2').css('visibility','visible')
}

//添加一行
$('.addTable').click(function(){
	 var tr_len = $("#table1 tr").length;
	 var str = ""
	 str+='<tr style="margin-top: 45px" class=jx'+tr_len+'>'
	 str+='<td width="20px"><input type="checkbox" name="check" style="width: 15px"></td>'
	 str+='<td><input type="text" readonly="readonly" class="fseq2" value='+tr_len+' style="width: 40px"><input type="hidden" name="fseq" class="fseq" value='+tr_len+'></td>'
    str += '<td><input type="text" name="studentName" class="studentName is_click_ne" onclick = "xy($(this))"></td>'
	 str+='<td><input type="text" name="cfstudentno" class="cfstudentno" readonly unselectable="on"><input type="hidden" name="cfstudentid"></td>'
	 str+='<td><input type="text" name="cfidcardno" class="cfidcardno" readonly unselectable="on"></td>'
	 str+='<td><input type="text" name="cfsex2" class="cfsex2" readonly unselectable="on"><input type="hidden" name="cfsex"></td>'
	 str+='<td><input type="text" name="cfmobile" class="cfmobile" readonly unselectable="on"></td>'
     str+='<td><input type="text" name="cfrxrq" class="cfrxrq" readonly unselectable="on"></td>'
    str += '<td><input type="text" name="dqClazz" class="dqClazz is_click_ne" onclick = "bj($(this))"><input type="hidden" name="cfcurrentclassid"></td>'
     str+='<td><input type="text" name="cfamount" class="cfamount" readonly unselectable="on"></td>'
     str+='<td><input type="text" name="cfshje" class="cfshje" onblur="cfshje2($(this))"></td>'
    str += '<td><input type="text" name="zrClazz" class="zrClazz is_click_ne" onclick = "bj($(this))"><input type="hidden" name="cfreturninclassid"></td>'
     str+='<td><input type="text" name="cfzrbjamount" class="cfzrbjamount" readonly unselectable="on"></td>'
    str += '<td><input type="text" name="cfsfje" class="cfsfje" onblur="cfsfje2($(this))"></td>'
    str += '<td><input type="text" name="cfremark" class="cfremark"></td>'
	 $("#table1").append(str)
})

 //可以输入小数点
 $(".cfshje,.cfsfje").live('keyup', function(event) {
		//最后一位是小数点的话，移除
		var $amountInput = $(this);
		//响应鼠标事件，允许左右方向键移动 
		event = window.event || event;
		if(event.keyCode == 37 | event.keyCode == 39) {
			return;
		}
     //获取父类class名称
     var superclass = $(this).parent().parent().prop("class")
		var clazz = $(this).prop("class")
		//获取输入框的值
		var value = $('.'+clazz+'').val();
		//判断负数是否在第一位
		 if(value.substring(0,1) == '-'){
			
		 }
		//判断负数不是在第一位，替换
		 if(value.lastIndexOf('-') > 0){
             $('.superclass .' + clazz + '').val("")
			// $amountInput.val($amountInput.val().replace('-','')
		 }
		//先把非数字的都替换掉，除了数字和. 
		$amountInput.val($amountInput.val().replace(/[^\-?\d.]/g, "").
		//只允许一个小数点              
		replace(/^\./g, "").replace(/\.{2,}/g, ".").
		//只能输入小数点后两位
		replace(".", "$#$").replace(/\./g, "").replace("$#$", ".").replace(/^(\-)*(\d+)\.(\d\d).*$/, '$1$2.$3'));
});

/* 关闭弹出框    */
$('.btn').click(function(){
	$('#modal-overlay').css('visibility','hidden')
	$('.modal-data').css('visibility','hidden')
	$('.modal-data2').css('visibility','hidden')
	$(".stu").val("");
})
//根据名称查询班级
$('.findBtn2').click(function(){
		 var name = $('.name').val()
			 $.ajax({
				    url:'<%=path%>/DrivingSys/selClazzByName', 
				    type: "post",
				    data:{'name':name},
				    dataType:"json",         	
				    success: function(json) {
		            var str=''
		            for(var i=0;i<json.length;i++) {
		               str+='<tr style="margin-top: 45px" class="jx"><td><input style="width: 15px;height: 15px" '
		               str+='type="checkbox" name="jx"  value="'+json[i].fid+'"></td>'
		               if( json[i].fnumber != null){
		        	   str+='<td>'+json[i].fnumber+'</td><td>'+json[i].fnameL2+'</td>'
		               }else{
		            	str+='<td></td><td>'+json[i].fnameL2+'</td>'  
		               }
		               if(json[i].fsimplename!=null){
		            	str+='<td>'+json[i].cfprice+'</td><td>'+json[i].fsimplename+'</td>'	
		               }else{
		                str+='<td>'+json[i].cfprice+'</td><td></td>'   
		               }
		               if(json[i].fdescriptionL2!=null){
			            	str+='<td>'+json[i].fdescriptionL2+'</td><td>'+json[i].fcreatetime+'</td>'	
			               }else{
			                str+='<td></td><td>'+json[i].fcreatetime+'</td>'   
			               }
	        		   str+='<td>'+json[i].createName+'</td><td>'+json[i].flastupdatetime+'</td>'
	        		   str+='<td>'+json[i].updateName+'</td><td>'+json[i].cfficompanyName+'</td>'
	        		   if(json[i].cfsycl!=null){
	        			   str+='<td>'+json[i].cfsycl+'</td>'
	        		   }else{
	        			   str+='<td></td>' 
	        		   }	   
	        		   if (json[i].cfksf == '1'){
	        		   str+='<td><input style="width: 15px;height: 15px" type="checkbox" checked="checked" disabled="disabled"></td>'  
	        		   } else {
	        			str+='<td><input style="width: 15px;height: 15px" type="checkbox" disabled="disabled"></td>	'	   
	        		   }
		               if (json[i].cflc == '1'){
		        		   str+='<td><input style="width: 15px;height: 15px" type="checkbox" checked="checked" disabled="disabled"></td>'  
		        		   } else {
		        			str+='<td><input style="width: 15px;height: 15px" type="checkbox" disabled="disabled"></td>	'	   
		        	   }
		               if(json[i].cfvip=='1'){
		        		   str+='<td><input style="width: 15px;height: 15px" type="checkbox" checked="checked" disabled="disabled"></td>'  
		        		   }else{
		        			str+='<td><input style="width: 15px;height: 15px" type="checkbox" disabled="disabled"></td>	'	   
		        	   }
		               if(json[i].cftx=='1'){
		        		   str+='<td><input style="width: 15px;height: 15px" type="checkbox" checked="checked" disabled="disabled"></td>'  
		        		   }else{
		        			str+='<td><input style="width: 15px;height: 15px" type="checkbox" disabled="disabled"></td>	'	   
		        	   }
		               str+='<td>启用</td></tr>'
		            }
		            $(".jx").remove()
		            $('.head1').append(str)
					},  
	 				error: function(){alert('Error');} 
	 	 		});
		})		
 
 //单击选中
 $(".jx td").live('click',function(){
    $('input:checkbox[name=jx]:checked').each(function(i) {
    	$(this).removeAttr("checked");
     });
       $(this).parent().find("input:checkbox").attr('checked','checked');
  })  

 //由于和input:checkbox冲突，在选择一次
 $("#table1 tr td input:checkbox").live('click',function(){
	 if($(this).is(':checked')){
	    	$(this).removeAttr("checked");
	    }else{
	    	$(this).attr("checked",":checked")
	    }
 })
  //单击选中
  $("#table1 tr td").live('click',function(){
    if($(this).parent().find("input:checkbox").is(':checked')){
    	$(this).parent().find("input:checkbox").removeAttr("checked");
    }else{
    	$(this).parent().find("input:checkbox").attr("checked",":checked")
    }
 }) 
  
//选择数据
 $('.subtn').click(function () {
	 var fseq = $(".stu").val();
	 var spCodesTemp = "";
		 $('input:checkbox[name=student]:checked').each(function (i) {
	         if (0 == i) {
	             //把学生id增加到字表中
	             spCodesTemp = $(this).val();
	         }
	     });
		 if(spCodesTemp == ""){
			 alert("请至少选择一条数据")
			 return false
		 }
     var a = studentRepetition(spCodesTemp, null)
     if (!a) {
         alert("不能添加重复学员");
         return;
     }
	     $.ajax({
	          url: '<%=path%>/DrivingSys/selStudentByFid',
	          type: "post",
	          async: true,
	          data: {'id': spCodesTemp},
	          dataType: "json",
	          success: function (json) {
	        	  studentData2(json.studentsNameList[0],fseq);
	            },
	            error: function () {
	                alert('Error');
	            }
	       })
 });

//去除重复学员数据
function studentRepetition(oneStudent, muchStudent) {
    var a = true;
    if (oneStudent == null) {
        var strs = new Array(); //定义一数组
        strs = muchStudent.split(",");//转换成数组
        //循环添加的学员
        for (var i = 0; i < strs.length; i++) {
            //循环现有的学员
            $("input[name='cfstudentid']").each(function (j) {
                //判断添加的学员不能与现有的学员重复
                if (strs[i] == $(this).val()) {
                    a = false
                }
            })
        }
    } else {
        //循环现有的学员
        $("input[name='cfstudentid']").each(function (j) {
            //判断添加的学员不能与现有的学员重复
            if (oneStudent == $(this).val()) {
                a = false
            }
        })
    }
    return a;
}

 //双击确定
   $(document).on('dblclick','.xysj td',function(){
	     var fseq = $(".stu").val();
		 var spCodesTemp = "";
		 $('input:checkbox[name=student]:checked').each(function (i) {
			  if (0 == i) {
			       //把学生id增加到字表中
			        spCodesTemp = $(this).val();
			   } 
		 });
       var a = studentRepetition(spCodesTemp, null)
       if (!a) {
           alert("不能添加重复学员");
           return;
       }
		 $.ajax({
		          url: '<%=path%>/DrivingSys/selStudentByFid',
		          type: "post",
		          async: true,
		          data: {'id': spCodesTemp},
		          dataType: "json",
		          success: function (json) {
		        	  studentData2(json.studentsNameList[0],fseq);
		            },
		            error: function () {
		                alert('Error');
		            }
		})
   })
//放入学生数据
function studentData2(studentsNameList1,fseq){
	  if(studentsNameList1.fnameL2 == null){
		  
 	  }else{
 	  	$('.'+fseq+'').find(".studentName").val(studentsNameList1.fnameL2);
 	  }
 	  if(studentsNameList1.fnumber == null){
 		$('.'+fseq+'').find(".cfstudentno").next().val(studentsNameList1.fid);
 	  }else{
 	  	$('.'+fseq+'').find(".cfstudentno").val(studentsNameList1.fnumber);
 	  	$('.'+fseq+'').find(".cfstudentno").next().val(studentsNameList1.fid);
 	  }
 	  if(studentsNameList1.cfidcardno == null){
 		  
 	  }else{
 	  	$('.'+fseq+'').find(".cfidcardno").val(studentsNameList1.cfidcardno);
 	  }
 	  if(studentsNameList1.cfsex == '1'){
     		 $('.'+fseq+'').find(".cfsex2").val("男");
     		 $('.'+fseq+'').find(".cfsex2").next().val(1);
       }else{
     		 $('.'+fseq+'').find(".cfsex2").val("女");
     		 $('.'+fseq+'').find(".cfsex2").next().val(2);
       }
 	  if(studentsNameList1.cfsjhm == null){
 		  
 	  }else{
 	  	 $('.'+fseq+'').find(".cfmobile").val(studentsNameList1.cfsjhm);
 	  }
 	  if(studentsNameList1.cfrxsj == null){
 		  
 	  }else{
 	  	 $('.'+fseq+'').find(".cfrxrq").val(studentsNameList1.cfrxsj);
 	  }
	  if(studentsNameList1.cfreceived == null){
 		  
 	  }else{
 	  	 $('.'+fseq+'').find(".cfshje").val(studentsNameList1.cfreceived);
 	  }
	  //计算退费金额
	  var cfshje = $('.'+fseq+'').find(".cfshje").val();
	  if(cfshje == null || cfshje == ''){
		  cfshje = 0;
	  }
	  var zrje = $('.'+fseq+'').find(".cfzrbjamount").val();
	  if(zrje == null || zrje == ''){
		  zrje = 0;
	  }
	  var sfje = cfshje*1 - zrje*1;
	  sfje = decimal(sfje,2);
	  $('.'+fseq+'').find(".cfsfje").val(sfje);
	  $('#modal-overlay').css('visibility','hidden')
	  $('.modal-data').css('visibility','hidden')
	  $('.modal-data2').css('visibility','hidden')
 }
   
 //选择班级数据
 $(".subtn2").click(function(){
	 var fseq = $(".stu").val();
	 var type = $(".stu2").val();
	 var fid = "";
	 var name = "";
	 var cfamount = "";
	 $('input:checkbox[name=jx]:checked').each(function (i) {
		  if (0 == i) {
		       //把学生id增加到字表中
		        fid = $(this).val();
		        name = $(this).parent().next().next().text();
		        cfamount = $(this).parent().next().next().next().text();
		  } 
	 });
	 if(fid == ""){
		 alert("请至少选择一条数据")
		 return false
 	}
	 clazzData(fseq,type,fid,name,cfamount)
 })
 
  //双击确定
   $(document).on('dblclick','.jx td',function(){
	     var fseq = $(".stu").val();
		 var type = $(".stu2").val();
		 var fid = "";
		 var name = "";
		 var cfamount = "";
		 $('input:checkbox[name=jx]:checked').each(function (i) {
			  if (0 == i) {
			        fid = $(this).val();
			        name = $(this).parent().next().next().text();
			        cfamount = $(this).parent().next().next().next().text();
			   } 
		 });
		 clazzData(fseq,type,fid,name,cfamount)
   })
 
//num是要处理的数字  v为要保留的小数位数
function decimal(num,v){
	var vv = Math.pow(10,v);
	return Math.round(num*vv)/vv;
}

//放入班级信息
function clazzData(fseq,type,fid,name,cfamount){
    if (type == 'dqClazz is_click_ne') {
		if(name == null || name == ''){
			$('.'+fseq+'').find(".dqClazz").next().val(fid);
		}else{
			$('.'+fseq+'').find(".dqClazz").val(name);
			$('.'+fseq+'').find(".dqClazz").next().val(fid);
		}
	 	if(cfamount == null || cfamount == ''){
	 		  
	 	}else{
	 	  	$('.'+fseq+'').find(".cfamount").val(cfamount);
	 	}
	}else{
		if(name == null || name == ''){
			$('.'+fseq+'').find(".zrClazz").next().val(fid);
		}else{
			$('.'+fseq+'').find(".zrClazz").val(name);
			$('.'+fseq+'').find(".zrClazz").next().val(fid);
		}
	 	if(cfamount == null || cfamount == ''){
	 		  
	 	}else{
	 	  	$('.'+fseq+'').find(".cfzrbjamount").val(cfamount);
	 	}
	}
	  //计算退费金额
	  var cfshje = $('.'+fseq+'').find(".cfshje").val();
	  if(cfshje == null || cfshje == ''){
		  cfshje = 0;
	  }
	  var zrje = $('.'+fseq+'').find(".cfzrbjamount").val();
	  if(zrje == null || zrje == ''){
		  zrje = 0;
	  }
	  var sfje = cfshje*1 - zrje*1;
	  sfje = decimal(sfje,2);
    //当前班级金额
    var dqbjje = $('.' + fseq + '').find(".cfamount").val() * 1;
    //转入班级金额
    var zrbjje = $('.' + fseq + '').find(".cfzrbjamount").val() * 1;
    if (dqbjje == null || dqbjje == '') {

    } else if (zrbjje == null || zrbjje == '') {

    } else if (dqbjje > zrbjje) {
        alert("转入班级金额小于当前班级金额");
    } else {

    }

	  $('.'+fseq+'').find(".cfsfje").val(sfje);
	  $('#modal-overlay').css('visibility','hidden')
	  $('.modal-data').css('visibility','hidden')
	  $('.modal-data2').css('visibility','hidden')
}
 
 //根据实收金额计算退费金额
 function cfshje2(_this){
	//避免最后一个字符串是.
	_this.val((_this.val().replace(/\.$/g, "")));
	if(_this.val() == '-'){
		_this.val("")
	}
     //判断输入错误
     if (isNaN(Number(_this.val()))) {
         _this.val("")
     }
	 //实收金额
	 var money = _this.val();
	 //转入班级金额
	 var zrje = _this.parent().next().next().find(".cfzrbjamount").val();
	 if(money == null || money == ''){
		 money = 0;
	  }
	  if(zrje == null || zrje == ''){
		  zrje = 0;
	  }
	  //计算退费金额
	  var tfje = money*1 - zrje*1;
	  tfje = decimal(tfje,2);
	  _this.parent().next().next().next().find(".cfsfje").val(tfje);
 }

//收费金额
function cfsfje2(_this) {
    //避免最后一个字符串是.
    _this.val((_this.val().replace(/\.$/g, "")));
    if (_this.val() == '-') {
        _this.val("")
    }
    //判断输入错误
    if (isNaN(Number(_this.val()))) {
        _this.val("")
    }
}

//审核,反审核弹框
$("#sh,#fsh").click(function () {
    var type = $(this).next().val();
    $("#type").val(type)
    if (type == 1) {
        $('#modal-overlay').css('visibility', 'visible')
        $('.modal-data9').css('visibility', 'visible')
        $('li input:radio:first').attr('checked', 'checked');
    }
    else if (type == 2) {
        $('#modal-overlay').css('visibility', 'visible')
        $('.modal-data10').css('visibility', 'visible')
    }
})

//审核,反审核
$("#auditsubmit,#againstAuditsubmit").click(function () {
    //防止重复提交
    $(this).attr("disabled", "disabled")
    var state = $('li input[type="radio"]:checked ').val();//同意/不同意
    var fid = $("#fid").val();//fid
    var fnumber = $("input[name='fnumber']").val();//编码
    var type = $("#type").val();
    var message;
    if (type == '1') {
        message = $("#auditcomment").val();
    } else {
        message = $("#againstAuditcomment").val();
    }
    var studentName = new Array();
    var studentId = new Array();
    var cfstudentno = new Array();
    $(".studentName").each(function (i) {
        studentName[i] = $(this).val();
        studentId[i] = $(this).parent().next().find("input:hidden").val();
        cfstudentno[i] = $(this).parent().next().find(".cfstudentno").val();
    })
    $.ajax({
        url: '<%=path%>/DrivingSys/auditChargeClazzWillmigerl',
        type: "post",
        data: {
            'fid': fid,
            'type': type,
            'fnumber': fnumber,
            'message': message,
            'state': state,
            'studentName': studentName,
            'studentId': studentId,
            'cfstudentno': cfstudentno
        },
        dataType: "json",
        success: function (json) {
            var url = '/queryChargeClazzWillmigerl/look.action';
            if (type == '1') {
                if (json == '1') {
                    showAlert('审核成功,并且此流程已结束', url)
                } else if (json == '2') {
                    showAlert('审核成功', url)
                } else {
                    showAlert('审核失败', url)
                }
            } else {
                if (json == '1') {
                    showAlert('反审核成功', url)
                } else if (json == '2') {
                    showAlert('没有找到任务', url)
                } else if (json == '0') {
                    showAlert('找不到流程节点', url)
                }
            }
        },
        error: function () {
            $("#againstAuditsubmit,#auditsubmit").attr("disabled", false)//去除input元素的disabled属性
            alert('错误');
        }
    })
})

//提交
$("#submit").click(function () {
    $.messager.confirm('提示', '是否提交,提交后不会改变修改后的值', function (r) {
        if (r) {
            var url = '/queryChargeClazzWillmigerl/look.action';
            var fid = $("#fid").val();
            var fnumber = $("input[name='fnumber']").val();
            var auditState = $("#auditState").val();
            var studentName = new Array();
            var studentId = new Array();
            var cfstudentno = new Array();
            $(".studentName").each(function (i) {
                studentName[i] = $(this).val();
                studentId[i] = $(this).parent().next().find("input:hidden").val();
                cfstudentno[i] = $(this).parent().next().find(".cfstudentno").val();
            })
            $.ajax({
                url: '<%=path%>/DrivingSys/submitChargeClazzWillmigerl',
                type: "post",
                data: {
                    'fid': fid,
                    'fnumber': fnumber,
                    'auditState': auditState,
                    'studentName': studentName,
                    'studentId': studentId,
                    'cfstudentno': cfstudentno
                },
                dataType: "json",
                success: function (json) {
                    if (json == '1') {
                        showAlert('提交成功', url)
                    } else {
                        showAlert('提交失败', url)
                    }
                },
                error: function () {
                    alert('Error');
                }
            })
        }
    })
})

//验证单据下是否有数据
function verify() {
    var s = 0;
    var a = 0;
    $("input[name='cfstudentid']").each(function () {
        if ($(this).val() == '' || $(this).val() == null) {
            a = 1;
        } else {
            s = 1;
        }

    })
    var ywrq = $("#ywrq").val();
    if (ywrq == null || ywrq == '') {
        alert("业务日期不能为空");
        return false;
    }

    if (a == 1) {
        alert("学员不能为空")
        return false;
    }
    if (s == 0) {
        alert("请至少添加一条数据");
        return false;
    }
    $("input[type='submit']").attr("disabled", "disabled");
}
//只读的属性不被修改
$('input[readonly]').on('focus', function () {
    $(this).trigger('blur');
});
</script>
</html>